package com.crowntit.infrastructure.adapter.repository;

import com.crowntit.domain.goods.adapter.repository.IGoodsRepository;
import com.crowntit.infrastructure.dao.IOrderDao;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class GoodsRepository implements IGoodsRepository {

    @Resource
    private IOrderDao orderDao;

    @Override
    public void changeOrderDealDone(String orderId) throws Exception {
        Integer result = orderDao.changeOrderDealDone(orderId);
        if (result != 1){
            throw new Exception("数据库修改行数错误");
        }
    }
}
